﻿#coding=utf-8
names = ['张三', '李四', '王二麻子']
for name in names:
    print(name)

# 计算1-10的整数之和
sum = 0
# range()函数，可以生成一个整数序列，再通过list()函数可以转换为list。比如range(5)生成的序列是从0开始小于5的整数：
array = list(range(101));
print(array)
for x in array:
    sum = sum + x
print(sum)

sum = 0
i = 100
while i > 0:
    sum = sum + i
    i = i - 1
print(sum)
print('END\n')

n = 1
while n <= 100:
    if n > 10:
        print('n大于10退出')
        break
    print(n)
    n = n + 1
print('END\n')

n = 0
while n <= 100:
    n = n + 1
    if n % 10 == 0:
        print(n,'是十的倍数')
        continue
    print(n)
print('END\n')

